package ext.tianma.project2.APQP.service;

import org.apache.log4j.Logger;

import wt.log4j.LogR;

import com.ptc.core.ui.validation.DefaultSimpleValidationFilter;
import com.ptc.core.ui.validation.UIValidationCriteria;
import com.ptc.core.ui.validation.UIValidationKey;
import com.ptc.core.ui.validation.UIValidationStatus;

import ext.tianma.bom.util.GenericUtil;

/**
 * 类名: RoleCheckService </br>
 * 包名: ext.tianma.bom.expand.service
 * 描述: 图纸卡控，用于判断是否管理员
 * @author xucr
 * 创建时间: 2020年6月16日
 * 发布版本: V1.0
 */
public class APQPCheckService extends DefaultSimpleValidationFilter {
	
	private static final Logger LOGGER = LogR.getLogger(APQPCheckService.class.getName());

	public UIValidationStatus preValidateAction(UIValidationKey key, UIValidationCriteria criteria) {
		UIValidationStatus ui = UIValidationStatus.HIDDEN;
		boolean isGroup = GenericUtil.isAdministrators();
		if(isGroup) {
			ui = UIValidationStatus.ENABLED;
		}
		return ui;
	}
}
